

import request from "../request/index";

const orderApi = {
  orderAdd: function (data) {
    return request({
      url: '/order/add',
      method: 'POST',
      data
    })
  },
  orderPay: function (orderid,code) {
    return request({
      url: `/pay/${orderid}?code=`+code,
      method: 'GET'
    })
  },
  orderPage: function (data) {
    return request({
      url: '/order/page',
      method: 'POST',
      data
    })
  },
  orderDetail: function (orderId) {
    return request({
      url: `/order/detail/${orderId}`,
      method: 'GET',
    })
  },
  //售后
  orderAfterSales: function (data) {
    return request({
      url: `/order/after-sales`,
      method: 'POST',
      headers: { "Content-Type": data.contentType},
      data:data.buffer
    })
  },
  //确认取件
  orderConfirmFetch: function (id) {
    return request({
      url: `/order/confirm-fetch/${id}`,
      method: 'POST',
    })
  },
  orderConfirmSign: function (data,id) {
    return request({
      url: `/order/confirm-sign/${id}`,
      method: 'POST',
      headers: { "Content-Type": data.contentType},
      data:data.buffer
    })
  },


  
  
  
}
export default orderApi